| Miles Sound System SDK 7.2a |
Input:
AX = 304H
BX = Driver number
VDI_HDR IO structure contains I/O parameters to verify
Output:
AX > 0: Device I/O parameters verified successfully
AX = 0: Device with specified I/O parameters could not be found
This function should be called prior to Function 305H (Initialize Device) to verify that the VDI_HDR IO structure contains the correct I/O parameters for the device. Its normal use is to verify known I/O settings at application startup time, prior to initializing the sound driver. When used to auto-detect a supported device with unknown I/O parameters, only the IO_PARMS settings found in the DDT's *common_IO_configurations should be passed to the function. Arbitrary or excessive "scanning" with this function is likely to cause system crashes or other undesired effects. Installation programs which auto-detect sound cards should prompt the end user for permission to do so!
This function should not be called after Function 305H (Initialize Device), unless the driver is shut down first with a call to Function 306H (Shut Down Device).
The value returned in AX will equal 0 if the device did not respond. An AX value of 1 or greater indicates successful detection of the device; some implementations of this function may elect to return a hardware revision level in AX for diagnostic purposes.
Many devices use resident drivers or non-volatile hardware registers to maintain some or all of their I/O parameter settings. Function 304H handlers for these devices may access these settings through the appropriate device-specific mechanisms, and update the VDI_HDR IO_PARMS structure prior to returning successfully.
For digital drivers, the DDT's format_supported and format_data array members may be altered by this function in response to information obtained about the hardware during initialization. For example, a Sound Blaster-compatible device driver may increase format_data's minimum and nominal buffer size fields to reduce clicking with device versions that do not support auto-initialize DMA.
Digital devices which support both 8-bit and 16-bit samples often make use of a separate DMA channel for 16-bit processing. It is generally not necessary to validate both the 8- and 16-bit DMA channels when only one of the sample modes is required by the application. The DIG_DETECT options (below) allow MSS to avoid unnecessary detection failures by selecting which DMA channel options to verify.
#define DIG_DETECT_8_BIT_ONLY 0x0001
#define DIG_DETECT_16_BIT_ONLY 0x0002
#define DIG_DETECT_8_AND_16_BITS 0x0003
Group:
DOS Sound Driver Generic Initialization Interface
Related Structures:
IO_PARMS, VDI_HDR
For technical support, e-mail Miles3@radgametools.com
© Copyright 1991-2007 RAD Game Tools, Inc. All Rights Reserved.